package Generics.a02demo2;

import java.util.ArrayList;

public class Test1 {
    public static void main(String[] args) {

        ArrayList<String> list = new ArrayList<>();
        ListUtil.addAll(list, "a", "b");
        System.out.println(list);
    }
}

class ListUtil {
    public ListUtil() {
    }

    public static <E> void addAll(ArrayList<E> list, E e1, E e2) {
        list.add(e1);
        list.add(e2);
    }
}
